﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PlanningGIS.MapSheet
{
    /// <summary>
    /// 
    /// </summary>
    public class SheetHelper
    {

        /// <summary>
        /// 厘米
        /// </summary>
        public const string _UNIT_CM = "厘米";

        /// <summary>
        /// 毫米
        /// </summary>
        public const string _UNIT_MM = "毫米";

        /// <summary>
        /// 英寸
        /// </summary>
        public const string _UNIT_IN = "英寸";

        /// <summary>
        /// 点
        /// </summary>
        public const string _UNIT_PT = "点";


        /// <summary>
        /// 
        /// </summary>
        public const string T_NamePrefix = "结合表";

        /// <summary>
        /// 图号字段名称
        /// </summary>
        public const string F_MapNo = "图号";

        /// <summary>
        /// 左上角[西北角]字段名称
        /// </summary>
        public const string F_LeftTop = "LeftTop";

        /// <summary>
        /// 正上方[正北方]字段名称
        /// </summary>
        public const string F_TopIn = "TopIn";

        /// <summary>
        /// 右上角[东北角]字段名称
        /// </summary>
        public const string F_RightTop = "RightTop";

        /// <summary>
        /// 正左方[正西方]字段名称
        /// </summary>
        public const string F_LeftIn = "LeftIn";

        /// <summary>
        /// 正右方[正东方]字段名称
        /// </summary>
        public const string F_RightIn = "RightIn";

        /// <summary>
        /// 左下角[西南角]字段名称
        /// </summary>
        public const string F_LeftUnder = "LeftUnder";

        /// <summary>
        /// 正下方[正南方]字段名称
        /// </summary>
        public const string F_UnderIn = "UnderIn";

        /// <summary>
        /// 右下角[东南角]字段名称
        /// </summary>
        public const string F_RightUnder = "RightUnder";

        /// <summary>
        /// 
        /// </summary>
        public static SheetConfig Config { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public static List<int> GetScales()
        {
            if (Config == null || Config.ScaleTypes == null || Config.ScaleTypes.Count == 0) return null;
            var v = from p in Config.ScaleTypes
                    select p.Value;
            return v.ToList(); 
        }
    }
}
